package com.pisolution.actuator.client;

import com.pisolution.actuator.client.dependencies.DependenciesEndpoint;
import com.pisolution.actuator.client.gc.GCLogEndpoint;
import com.pisolution.actuator.client.metrics.JVMMetricEndpoint;

import org.springframework.context.annotation.Bean;

/**
 * 客户端应用程序外部接口.
 *
 * @author sora
 * @version 0.1.0
 */
public class ActuatorClientEndpoints {
    // -------------------------------------------------------------------------------------------------
    //  日志相关
    // -------------------------------------------------------------------------------------------------

    /**
     * 获取垃圾回收器日志内容.
     *
     * @return 垃圾回收期外部接口.
     */
    @Bean
    public GCLogEndpoint gcLogEndpoint() {
        return new GCLogEndpoint();
    }

    // -------------------------------------------------------------------------------------------------
    //  客户端检测相关
    // -------------------------------------------------------------------------------------------------

    /**
     * 检测应用程序依赖使用情况.
     *
     * @return 应用程序依赖使用情况.
     */
    @Bean
    public DependenciesEndpoint dependenciesEndpoint() {
        return new DependenciesEndpoint();
    }

    // -------------------------------------------------------------------------------------------------
    //  客户端监控相关
    // -------------------------------------------------------------------------------------------------

    /**
     * 获取垃圾回收器运行情况.
     *
     * @return 垃圾回收器运行情况.
     */
    @Bean
    public JVMMetricEndpoint jvmMetricEndpoint() {
        return new JVMMetricEndpoint();
    }
}
